package cn.jiedanba.cacert.ca.vo;

import java.io.Serializable;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

import org.springframework.validation.annotation.Validated;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@Validated
@ApiModel(description = "获取证书")
public class GetCertVo implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 模板id
	 */

	@NotBlank(message = "证书模板id不能为空")
	@ApiModelProperty(required = true, value = "证书模板id")
	private String templateId;

	/**
	 * 证书主题
	 */
	@NotBlank(message = "证书主题不能为空")
	@ApiModelProperty(required = true, value = "证书主题")
	private String subjectDn;

	/**
	 * 公钥
	 */
	@NotBlank(message = "证书公钥不能为空")
	@ApiModelProperty(required = true, value = "证书公钥")
	private String pubKey;

	/**
	 * 证书天数
	 */
	@NotBlank(message = "证书天数不能为空")
	@Min(value = 1, message = "证书天数不能小于1")
	@ApiModelProperty(required = true, value = "证书天数")
	private String day;
}
